<?php

?>
<html>
	<head>
		<title>Feeds list</title>
        <script src="/scripts/prototype.js"><!-- --></script>
	</head>
	<body>
		<h1>Feeds list</h1>
		
		<p>
			<a href="/admin/create">Create a new feed</a>
		</p>
		
		<table border="1">
			<tr>
				<th>Name</th>
				<th>Title</th>
				<th>Created on</th>
				<th>Updated on</th>
				<th colspan="3">Actions</th>
			</tr>		
<?php

foreach($this->feeds as $feed)
{
?>
			<tr>
				<td><?php echo $feed->name; ?></td>
				<td><a href="/feeds/<?php echo $feed->name; ?>"><?php echo utf8_encode($feed->title); ?></a></td>
				<td><?php echo $feed->created; ?></td>
				<td><?php echo $feed->updated; ?></td>
				<td><a href="/feeds/<?php echo $feed->name; ?>">Display</a></td>
				<td><a href="/admin/add-entry?feed=<?php echo $feed->name; ?>">Add an entry</a></td>
				<td><a href="/admin/delete?name=<?php echo urlencode($feed->name); ?>">Supprimer</a></td>
			</tr>
<?php
}
?>
		</table>
	</body>
</html>
